package controller;

import bean.Account;

public class AddMoneyThreadController implements Runnable {
	 private Account account;    // 存入账户
	    private double money;       // 存入金额
	 
	    public AddMoneyThreadController(Account account, double money) {
	        this.account = account;
	        this.money = money;
	    }
	 
	    public void run() {
	    	synchronized(account){
	    		account.deposit(money);
	    	}
	    }
}
